import { http } from '@/utils/http/axios';
// 查询文档数据 /api/report/v1/search_data
export function serachData(params) {
  return http.request(
    {
      url: '/api/report/v1/search_data',
      method: 'get',
      params,
    },
    {
      isTransformResponse: true,
    }
  );
}

// 生成算法
export function algorithmAnalysis(params) {
  return http.request(
    {
      url: '/api/report/v1/analysis',
      method: 'post',
      params,
      responseType: 'blob',
    },
    {
      isTransformResponse: false,
    }
  );
}
// 修改文件名称
export function modifyFileName(params) {
  return http.request(
    {
      url: '/api/report/v1/modify_file_name',
      method: 'post',
      params,
    },
    {
      isTransformResponse: true,
    }
  );
}
// 删除文件
export function deleteFile(params) {
  return http.request(
    {
      url: '/api/report/v1/delete_file',
      method: 'post',
      params,
    },
    {
      isTransformResponse: true,
    }
  );
}
// 查询数据
export function listFile(params) {
  return http.request(
    {
      url: '/api/report/v1/list',
      method: 'get',
      params,
    },
    {
      isTransformResponse: true,
    }
  );
}
// 导出报告
export function exportReport(params) {
  return http.request(
    {
      url: '/api/report/v1/export_report',
      method: 'get',
      params,
    },
    {
      isTransformResponse: true,
    }
  );
}
// 下载数据
export function downloadData(params) {
  return http.request(
    {
      url: '/api/report/v1/download_data',
      method: 'get',
      params,
    },
    {
      isTransformResponse: true,
    }
  );
}
// 查询配置
export function queryConfig(params) {
  return http.request(
    {
      url: '/api/report/v1/record_config',
      method: 'get',
      params,
    },
    {
      isTransformResponse: true,
    }
  );
}
